<script lang="ts">
export default {
  name: "NodeDevice"
};
</script>

<script lang="ts" setup>
import { reactive, ref } from "vue";
import option from "./option";

const page = reactive({});
const loading = ref(false);

const getList = () => {
  loading.value = true;
  setTimeout(() => {
    loading.value = false;
  }, 1000);
};
const rowUpdate = (row: any) => {
  console.log("rowUpdate", row);
};
const rowSave = (row: any) => {
  console.log("rowSave", row);
};
const rowDel = (row: any) => {
  console.log("rowDel", row);
};
const refreshChange = (val: any) => {
  console.log("refreshChange", val);
};
const searchChange = (val: any) => {
  console.log("searchChange", val);
};
const form = reactive({});
const data = ref([]);
</script>

<template>
  <basic-container>
    <avue-crud
      ref="crud"
      :option="option"
      v-model:page="page"
      :table-loading="loading"
      @on-load="getList"
      @row-update="rowUpdate"
      @row-save="rowSave"
      @row-del="rowDel"
      @refresh-change="refreshChange"
      @search-reset="searchChange"
      @search-change="searchChange"
      v-model="form"
      :data="data"
    >
    </avue-crud>
  </basic-container>
</template>

<style lang="scss"></style>
